<?php

function get_event_by_id($id) {
	$customerId = Session::$user['customerId'];
	Session::switchCustomer(0);
	
	$eventModel = M('event');
	$event = $eventModel->where("id='" . $id ."'")->find();
	Session::switchCustomer($customerId);
	return $event;
}